/**
 * Created by sam on 16-10-13.
 */
var log4js = require('log4js');
var logConf = require('./logConf');
log4js.configure(logConf.config);

var logger = function(name){
    var logger = log4js.getLogger(name);
    return logger;
}

exports.logger = logger;



/*
var gor = function(){
    var log4js = require('log4js');
    log4js.configure({
            "appenders": [
                {
                    "type": "dateFile",
                    "filename": "../logs/test.log",
                    "pattern": "-yyyy-MM-dd",
                    "alwaysIncludePattern": false
                },
                {
                    "type": "console"
                }
            ]
        }
       // {cwd: 'instance/'+instance }
    );
    var logger = log4js.getLogger("test");
    logger.setLevel("ALL");
    return logger;
};

function test() {
    /!* var log = logger("test");
     log.info("aaa");*!/
    var g = gor();
    g.info("test")
}*/

